<template>
  <view>
    <public-header title="门店信息" :isBack="true"></public-header>
    <view class="store-info">
      <view class="title">
        <view class="icon">
          <text class="cuIcon-shop"></text>
        </view>
        <text>门店信息</text>
      </view>
      <bx-form :pk="storeNo" pkCol="store_no" type="detail" :serviceName="service" v-if="storeNo"></bx-form>
    </view>
  </view>
</template>

<script>
  import lockscreen from '@/common/mixins/lockscreen.js'
  export default {
    mixins: [lockscreen],
    data() {
      return {
        service: 'srvretail_store_info_detail_select'
      }
    },
    computed: {
      storeNo() {
        return this.tenantInfo?.tenant_no
      }
    },
    onLoad() {
      if (!this.tenantInfo?.tenant_no) {
        uni.showModal({
          title: '提示',
          content: '当前登录账号没有归属门店，请切换其他账号重试',
          showCancel: false,
          success: () => {
            uni.reLaunch({
              url: '/pages/main/cash/cash'
            })
          }
        })
      }
    },
    methods: {

    }
  }
</script>

<style lang="scss" scoped>
  .store-info {
    width: 100rem;
    margin: 5rem auto;
    background-color: #fff;
    border-radius: 2rem;
    padding: 4rem 5rem 0;

    .title {
      font-size: 3.6rem;
      font-weight: 700;
      display: flex;
      align-items: center;
      padding: 0 5rem;

      .icon {
        width: 7rem;
        height: 7rem;
        line-height: 7rem;
        text-align: center;
        color: #fff;
        background-color: $retail-color-primary;
        border-radius: 50%;
        margin-right: 3rem;
      }
    }

    ::v-deep .bx-form {
      .field-item {
        line-height: 6rem;
        margin-bottom: 2rem;
        border-radius: 1rem;
        border: 1px solid #e5e5e5;
        padding: 0 2.6rem;
      }
    }
  }
</style>
